package com.example.mobiledatapackage.response.uniformat;

/**
 * 统一返回格式中的状态码
 * 位于 ResultData 字段的 status 字段
 */
public enum ReturnCode {
    SUCCESS(0,"ok"),
    SERVE_ERROR(1001,"系统异常，请稍后重试"),
    ARGS_VALIDATION_ERROR(1002, "参数校验错误"),

    BUSINESS_ERROR(-1001, "业务异常");



    /**自定义状态码**/
    private final int code;
    /**自定义描述**/
    private final String message;

    ReturnCode(int code, String message){
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
